
<template>
  <div class="grade1 base-background-img">
    <ul class="ul-item-content">
      <li class="li-item-content" v-for='(item, index) in tabs' :key="index" :class="{'active': item.isSelected}" @click="swiper(item)">
        <img style="width:260px;height:51px;" :src="item.img" alt="">
      </li>
    </ul>
    <c-pdf @closePdf="closePdf" v-if="isshowpdf" :info="info" :infourl="pdfurl"></c-pdf>
  </div>
</template>

<script>
  import STATICPATH from '../../config.js'
  export default {
    name: 'grade6',
    data () {
      return {
        isshowpdf: false,
        ishsowvideo: false,
        info: '',
        infourl: '',
        tabs: [{
          img: 'static/robot/3x/1-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——数字游戏.pdf',
          data: [{
            isSelected: 1,
            name: '数字歌（78910）',
            url: STATICPATH + '/robot/6/大颗粒/数字歌（78910）.mp4'
          }]
        },
        {
          img: 'static/robot/3x/2-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——趣味组合.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/3-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——风能测风仪.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/4-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——直升飞机.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/5-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——跷跷板真有趣.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/6-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——回旋木马转呀转.pdf',
          data: [{
            isSelected: 1,
            name: '回旋木马',
            url: STATICPATH + '/robot/6/大颗粒/回旋木马.mp4'
          }]
        },
        {
          img: 'static/robot/3x/7-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——农场助手.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/8-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——白垩纪公园.pdf',
          data: [{
            isSelected: 1,
            name: '恐龙歌',
            url: STATICPATH + '/robot/6/大颗粒/恐龙歌.mp4'
          }]
        },
        {
          img: 'static/robot/3x/9-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——食物链.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/10-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——七大洲四大洋.pdf',
          data: []
        },
        {
          img: 'static/robot/3x/11-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——灵活的关节.pdf',
          data: [{
            isSelected: 1,
            name: '灵活的关节',
            url: STATICPATH + '/robot/6/大颗粒/灵活的关节.mp4'
          }]
        },
        {
          img: 'static/robot/3x/12-3.png',
          url: 'static/robot/pdf/6/【课程讲义】——我是小记者.pdf',
          data: []
        }]
      }
    },
    methods: {
      swiper: function (item) {
        console.log(item)
        this.info = item.data
        this.pdfurl = item.url
        this.isshowpdf = true
      },
      closePdf: function () {
        this.isshowpdf = false
      }
    }
  }
</script>

<style scoped>
.grade1 > div {
  position: absolute; 
}
.ul-item-content {
  margin: 0;
  padding: 0;
  list-style-type: none;
  z-index: 10;
  top: 230px;
  left: 190px;
  width: 910px;
  height: 480px;
  position: absolute;
}
.li-item-content {
  cursor: pointer;
  float: left;
  margin: 15px 20px;
  position: initial;
}
</style>
